import { ItemConfig } from "../../../resource/ItemConfig";
import { ECategory } from "../../../../../Message/Public/ECategory";
import { EProp } from "../../../../../Message/Public/EProp";
import { ItemData } from "../../../resource/info/ItemData";
import { Cache } from "../../../cache/Cache";
import { PetLifeStyleHuntConfig } from "../../../resource/PetLifeStyleHuntConfig";
import { TPetLifestyleHunt } from "../../../../../Message/Db/Tables/TPetLifestyleHunt";
type int = number;
//class PetMingJuLevelInfo
    
    export  class PetMingJuLevelInfo
    {
        constructor()
        {
            
            var loc1=ItemConfig.instance.getItemByType(ECategory._ECategoryProp, EProp._EPropLifeStyleHunt);
            if (loc1) 
            {
                this._costItemData = new ItemData(loc1.item.code);
            }
            return;
        }

        public get level(): int
        {
            return this._level;
        }

        public set level(arg1: int)
        {
            this._level = arg1;
            this._isCanPropCall = Cache.instance.petMing.isCanPropCall(this._level);
            this._isMaxCanPropCall = Cache.instance.petMing.isMaxCanPropCall(this._level);
            this._huntInfo = PetLifeStyleHuntConfig.instance.getPetLifeStyleHuntByLevel(this._level);
            return;
        }

        public get isMaxCanPropCall(): Boolean
        {
            return this._isMaxCanPropCall;
        }

        public set isMaxCanPropCall(arg1: Boolean)
        {
            this._isMaxCanPropCall = arg1;
            return;
        }

        public get isCanPropCall(): Boolean
        {
            return this._isCanPropCall;
        }

        public set isCanPropCall(arg1: Boolean)
        {
            this._isCanPropCall = arg1;
            return;
        }

        public get isShowCallButton(): Boolean
        {
            return this._level == 4 && !this.isCanPropCall;
        }

        public get huntInfo(): TPetLifestyleHunt
        {
            return this._huntInfo;
        }

        public get costItemData(): ItemData
        {
            return this._costItemData;
        }

        public reset(): void
        {
            this._isMaxCanPropCall = false;
            this._isCanPropCall = false;
            return;
        }

        /* internal */ /* var */_level: int;

        /* internal */ /* var */_isMaxCanPropCall: Boolean;

        /* internal */ /* var */_isCanPropCall: Boolean;

        /* internal */ /* var */_huntInfo: TPetLifestyleHunt;

        /* internal */ /* var */_costItemData: ItemData;
    }
